﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NewStart
{
    [Serializable]
    public class Settings
    {
        public Color backColor, foreColor, gradient1, gradient2;
        public bool enableAnimations;

        public List<TileInfo> tiles;
    }

    [Serializable]
    public class TileInfo
    {
        public string name, path;
        public bool largetile;
    }

    class SettingsHelper
    {
        public static Settings settings;

        public static void GetSettings()
        {
            settings = new SerialKILLER.Manager<Settings>(SerialKILLER.SerializerType.Binary).Load("menuinfo");

            if (settings == null)
            {
                settings = new Settings();
                settings.backColor = Color.FromArgb(0, 64, 80);
                settings.foreColor = Color.FromArgb(1, 74, 93);
                settings.enableAnimations = true;
                settings.tiles = new List<TileInfo>();
                SaveSettings();
            }
        }

        public static void SaveSettings()
        {
            new SerialKILLER.Manager<Settings>(SerialKILLER.SerializerType.Binary).Save(settings, "menuinfo");
        }
    }
}
